<template>
    <div id="map"></div>
  </template>
  <script>
  import AMapLoader from '@amap/amap-jsapi-loader'
    window._AMapSecurityConfig = {
        securityJsCode: 'a9d74ce67897ccd4d9b21bcb448facd0',//安全密钥
    }
  export default {
    name: 'aMap',
    data () {
      const testjson=require('../views/geojson/test.json');
      var testinfo=testjson.map(o=>{return{location:o.location}}).map(p=>{return[p.location]})
      console.log('info is ',testinfo)
      // let b=[]
      // for (let i in testinfo){
      //   b.push(testinfo[i])
      // }
      // console.log('b=',b)
      return {
        map: null
      }
    },
    mounted () {
      
      this.initMap()
    },
    methods: {// 初始化地图
     initMap () {
        AMapLoader.load({
          key: '0d0b0d13fba291a8b043159c44e80640',
          version: '2.0', // 指定要加载的 JSAPI 的版本，缺省时默认为 1.4.15
          plugins: [] // 需要使用的的插件列表，如比例尺'AMap.Scale'等
        }).then((AMap) => {
          // 初始化地图
          this.map = new AMap.Map('map', {
            mapStyle:'amap://styles/darkblue'
          })
          // 调用画出围栏
          this.setPolygon(AMap)
        }).catch(e => {
          console.log(e)
        })
      },
      setPolygon (AMap) {
        const path = [
        [106.424288,29.426292],[106.42589,29.425337],[106.426576,29.424372],[106.426759,29.423265],[106.427107,29.422746],[106.428085,29.422178],[106.430325,29.422273],[106.430706,29.421989],[106.43073,29.421342],[106.43022,29.420018],[106.429848,29.417488],[106.429986,29.416221],[106.430427,29.415526],[106.431954,29.414616],[106.432751,29.414512],[106.434392,29.415062],[106.435034,29.415977],[106.435517,29.417482],[106.436056,29.41797],[106.437652,29.418272],[106.438941,29.418092],[106.439394,29.417848],[106.439568,29.417161],[106.439271,29.416081],[106.439358,29.415636],[106.440192,29.415138],[106.441251,29.415294],[106.441797,29.417137],[106.441743,29.418059],[106.440792,29.420918],[106.440165,29.421797],[106.440219,29.422303],[106.441092,29.423292],[106.441746,29.423475],[106.443071,29.422947],[106.444145,29.422227],[106.444058,29.421489],[106.443191,29.420512],[106.443026,29.420021],[106.443509,29.418266],[106.44416,29.417396],[106.445158,29.41754],[106.446556,29.418886],[106.447612,29.419139],[106.449015,29.418791],[106.450038,29.418193],[106.450566,29.417473],[106.450131,29.416997],[106.448892,29.416392],[106.448745,29.416072],[106.449717,29.414952],[106.451396,29.414122],[106.452266,29.414018],[106.453322,29.414351],[106.45406,29.415925],[106.455799,29.417799],[106.457904,29.419832],[106.457817,29.420353],[106.456753,29.42151],[106.456093,29.425633],[106.45468,29.427961],[106.454422,29.428663],[106.454386,29.429987],[106.454542,29.43064],[106.457646,29.439699],[106.457403,29.441685],[106.458009,29.446265],[106.458642,29.446414],[106.461014,29.445844],[106.462082,29.446134],[106.462427,29.446762],[106.46156,29.447302],[106.459518,29.447943],[106.458756,29.448391],[106.457257,29.450707],[106.456312,29.451238],[106.454857,29.451829],[106.454216,29.45233],[106.452623,29.454145],[106.452083,29.455048],[106.451927,29.456396],[106.452848,29.458257],[106.454578,29.460731],[106.455256,29.461972],[106.45854,29.470873],[106.458921,29.472453],[106.459398,29.472734],[106.460636,29.472664],[106.461614,29.472105],[106.462889,29.47109],[106.463504,29.471044],[106.466146,29.473145],[106.467771,29.473835],[106.468578,29.473658],[106.469688,29.473145],[106.470206,29.473332],[106.47062,29.473896],[106.470674,29.475064],[106.469298,29.479276],[106.467756,29.481917],[106.46611,29.483277],[106.464229,29.484253],[106.464067,29.485284],[106.462706,29.485278],[106.461512,29.484293],[106.460696,29.482954],[106.460975,29.481389],[106.460127,29.480895],[106.45648,29.481813],[106.455454,29.482548],[106.454902,29.483555],[106.454869,29.485562],[106.455544,29.488203],[106.455553,29.488956],[106.454494,29.491109],[106.454323,29.492774],[106.454737,29.49321],[106.455892,29.493356],[106.456246,29.493222],[106.456039,29.491405],[106.457338,29.490136],[106.458141,29.489663],[106.458831,29.490078],[106.459467,29.490002],[106.459695,29.490731],[106.461179,29.490947],[106.461179,29.491652],[106.461632,29.492548],[106.46171,29.49532],[106.462478,29.495241],[106.463758,29.495787],[106.465771,29.495375],[106.467384,29.495293],[106.467873,29.495451],[106.467582,29.496323],[106.467687,29.49747],[106.468092,29.498132],[106.469463,29.497732],[106.470995,29.497692],[106.470944,29.496717],[106.47116,29.496537],[106.4731,29.496576],[106.475326,29.495823],[106.477563,29.495594],[106.477362,29.49493],[106.478049,29.492508],[106.479629,29.491682],[106.480586,29.490255],[106.481342,29.490102],[106.482053,29.490502],[106.483279,29.490444],[106.483828,29.490234],[106.483849,29.490917],[106.486311,29.491237],[106.486578,29.491432],[106.486647,29.492417],[106.48707,29.49199],[106.488476,29.492106],[106.488461,29.493182],[106.489619,29.492661],[106.490405,29.49142],[106.490408,29.490828],[106.490927,29.491057],[106.491032,29.491801],[106.493434,29.492008],[106.494657,29.492826],[106.494544,29.493149],[106.496157,29.494286],[106.49709,29.493734],[106.497776,29.493561],[106.497381,29.492466],[106.498469,29.49192],[106.499642,29.492075],[106.49993,29.491777],[106.498724,29.490731],[106.499309,29.490029],[106.49912,29.489322],[106.500419,29.489968],[106.500997,29.489877],[106.501249,29.489328],[106.502458,29.489224],[106.502548,29.489691],[106.503151,29.490377],[106.502752,29.490831],[106.502965,29.491356],[106.503472,29.491374],[106.503963,29.492167],[106.50295,29.492847],[106.502911,29.494988],[106.503217,29.495354],[106.504056,29.495158],[106.504176,29.494058],[106.505055,29.493371],[106.505571,29.493268],[106.507073,29.492264],[106.509704,29.491578],[106.513216,29.490782],[106.51488,29.490169],[106.517294,29.48887],[106.519525,29.487416],[106.520842,29.48751],[106.521154,29.487867],[106.520452,29.488904],[106.519034,29.490346],[106.51925,29.490578],[106.52143,29.488398],[106.522255,29.487236],[106.523709,29.485656],[106.524069,29.484845],[106.523787,29.483762],[106.521751,29.479971],[106.523196,29.479779],[106.527161,29.478703],[106.530544,29.477632],[106.532952,29.475979],[106.534677,29.474335],[106.535924,29.473722],[106.537379,29.473277],[106.540573,29.472804],[106.542027,29.472953],[106.543797,29.47378],[106.54565,29.474436],[106.547821,29.476622],[106.54921,29.478648],[106.550622,29.481783],[106.551036,29.483735],[106.551642,29.485345],[106.551999,29.487254],[106.552113,29.490453],[106.551654,29.492246],[106.549852,29.495509],[106.548214,29.496214],[106.547063,29.497168],[106.544369,29.498824],[106.539355,29.501281],[106.5382,29.502147],[106.536956,29.503276],[106.535603,29.50423],[106.534167,29.505444],[106.532946,29.507932],[106.532574,29.509301],[106.532316,29.511096],[106.532385,29.515779],[106.532652,29.520718],[106.532409,29.52413],[106.532151,29.526008],[106.53228,29.528705],[106.528427,29.529074],[106.524915,29.529489],[106.523166,29.529867],[106.522662,29.53012],[106.521892,29.530918],[106.521505,29.53162],[106.521166,29.533705],[106.520767,29.53433],[106.519969,29.534531],[106.5196,29.534348],[106.518611,29.532943],[106.518386,29.532202],[106.51895,29.53065],[106.518353,29.529733],[106.51733,29.529434],[106.515306,29.529568],[106.510735,29.530047],[106.509455,29.530992],[106.508702,29.531068],[106.507109,29.530614],[106.506789,29.530236],[106.5066,29.529169],[106.506252,29.528565],[106.504209,29.527931],[106.50202,29.528541],[106.500982,29.529791],[106.500602,29.53165],[106.500713,29.532958],[106.501525,29.535345],[106.502929,29.535799],[106.503364,29.536155],[106.50319,29.536555],[106.50062,29.537106],[106.499339,29.537832],[106.49888,29.538368],[106.498688,29.539133],[106.499054,29.540703],[106.499165,29.541864],[106.498688,29.543596],[106.497312,29.545903],[106.495599,29.546961],[106.484719,29.547957],[106.482787,29.548082],[106.481648,29.547924],[106.479905,29.547881],[106.479587,29.547366],[106.480997,29.546482],[106.48202,29.543974],[106.482997,29.540325],[106.483447,29.539042],[106.483438,29.538414],[106.483084,29.538124],[106.481555,29.538064],[106.480991,29.537792],[106.480145,29.538225],[106.47956,29.537917],[106.475767,29.537859],[106.475935,29.536366],[106.474954,29.535485],[106.474306,29.535335],[106.472036,29.535591],[106.469076,29.535357],[106.466296,29.534951],[106.464997,29.534512],[106.460076,29.532116],[106.459878,29.531781],[106.460217,29.530873],[106.461296,29.529611],[106.461593,29.528084],[106.460951,29.526855],[106.459746,29.526087],[106.457538,29.525886],[106.456345,29.525072],[106.456636,29.523889],[106.455856,29.521822],[106.452314,29.516676],[106.451162,29.513228],[106.449729,29.512587],[106.448466,29.511133],[106.448118,29.510322],[106.448076,29.50952],[106.448517,29.507928],[106.449603,29.506428],[106.448958,29.505395],[106.448169,29.505474],[106.447807,29.504959],[106.44772,29.501349],[106.447495,29.500046],[106.446982,29.499915],[106.445812,29.500897],[106.444844,29.500507],[106.444463,29.50012],[106.444082,29.498461],[106.443602,29.49707],[106.442846,29.496628],[106.443449,29.496153],[106.443227,29.495628],[106.442771,29.495863],[106.442543,29.495527],[106.442849,29.49471],[106.442792,29.494128],[106.441089,29.494012],[106.438297,29.494378],[106.435618,29.494585],[106.434596,29.49529],[106.434344,29.495881],[106.43444,29.497296],[106.434266,29.497903],[106.433216,29.498494],[106.43157,29.498787],[106.429168,29.498918],[106.427971,29.498622],[106.427005,29.498019],[106.426363,29.496945],[106.426336,29.49511],[106.425791,29.494045],[106.42529,29.493597],[106.424534,29.493332],[106.420584,29.493234],[106.417801,29.492194],[106.416734,29.492204],[106.415474,29.492603],[106.412316,29.492807],[106.409866,29.492835],[106.408435,29.492332],[106.407497,29.492929],[106.407044,29.494457],[106.406366,29.497546],[106.406315,29.499211],[106.406507,29.501388],[106.406873,29.502111],[106.407392,29.502303],[106.409398,29.50198],[106.410508,29.502422],[106.410891,29.503181],[106.411221,29.505553],[106.410858,29.506041],[106.409614,29.506099],[106.409095,29.507139],[106.409443,29.508041],[106.411362,29.509301],[106.411665,29.510325],[106.412193,29.51556],[106.412628,29.523898],[106.413282,29.533449],[106.413837,29.536454],[106.413231,29.53878],[106.414199,29.540118],[106.413854,29.540816],[106.409425,29.541109],[106.406786,29.541514],[106.405553,29.541078],[106.404339,29.539155],[106.403505,29.538883],[106.401837,29.539496],[106.401142,29.540084],[106.399474,29.542733],[106.398442,29.544684],[106.398502,29.546619],[106.398727,29.54842],[106.398068,29.549536],[106.39673,29.549929],[106.395887,29.549243],[106.395096,29.547915],[106.394322,29.545208],[106.394316,29.544449],[106.39473,29.542922],[106.395905,29.542212],[106.396217,29.541797],[106.395965,29.540761],[106.395791,29.538353],[106.395521,29.537164],[106.395156,29.536942],[106.394097,29.537247],[106.391716,29.53949],[106.390759,29.540514],[106.389709,29.540615],[106.388945,29.539517],[106.387589,29.539146],[106.386596,29.538533],[106.385448,29.536225],[106.38477,29.535643],[106.383666,29.535274],[106.382877,29.535207],[106.381363,29.535466],[106.379276,29.53657],[106.378112,29.53749],[106.377686,29.538176],[106.377233,29.539438],[106.377113,29.5407],[106.377833,29.541157],[106.378826,29.541154],[106.379279,29.541611],[106.378826,29.543273],[106.378895,29.544077],[106.379704,29.545793],[106.379773,29.546939],[106.378721,29.547402],[106.377842,29.548198],[106.376705,29.548149],[106.374879,29.547854],[106.375104,29.547018],[106.373928,29.546634],[106.372591,29.546775],[106.372156,29.547244],[106.37266,29.548079],[106.3726,29.54964],[106.372375,29.550514],[106.372024,29.550856],[106.369208,29.550987],[106.367199,29.551383],[106.366434,29.55181],[106.365198,29.552995],[106.364172,29.55373],[106.362442,29.554299],[106.361059,29.555071],[106.359659,29.557094],[106.357824,29.55884],[106.356126,29.559755],[106.35537,29.559742],[106.354872,29.559133],[106.355544,29.557716],[106.354935,29.556546],[106.353898,29.556521],[106.35316,29.557079],[106.352428,29.558609],[106.351759,29.559236],[106.35107,29.559191],[106.349654,29.558493],[106.346772,29.556646],[106.344178,29.555561],[106.343536,29.554906],[106.343632,29.554638],[106.344808,29.553842],[106.344154,29.553553],[106.342361,29.553187],[106.341734,29.552934],[106.340726,29.552093],[106.340099,29.549984],[106.338891,29.548399],[106.337799,29.547302],[106.336087,29.546348],[106.335148,29.544486],[106.334068,29.54401],[106.331153,29.544897],[106.329768,29.545431],[106.329369,29.545083],[106.329309,29.543736],[106.329576,29.54273],[106.329231,29.542575],[106.328151,29.543157],[106.327383,29.545309],[106.326679,29.54594],[106.326121,29.546089],[106.324975,29.545988],[106.323901,29.545546],[106.322537,29.544586],[106.321832,29.544833],[106.320282,29.544815],[106.318839,29.543821],[106.31775,29.543702],[106.315516,29.544016],[106.313783,29.545004],[106.312793,29.544873],[106.31234,29.54401],[106.312295,29.54269],[106.312079,29.542038],[106.311557,29.541496],[106.310277,29.540877],[106.309215,29.54123],[106.30938,29.542096],[106.308711,29.542343],[106.307935,29.541008],[106.306525,29.540916],[106.305817,29.540188],[106.306051,29.539216],[106.305697,29.538405],[106.304597,29.538381],[106.304591,29.538124],[106.302518,29.538134],[106.30116,29.537832],[106.300455,29.537835],[106.299711,29.538612],[106.299447,29.539786],[106.298761,29.541874],[106.298074,29.542553],[106.297306,29.542428],[106.295974,29.540959],[106.295057,29.540612],[106.294619,29.53995],[106.294994,29.538682],[106.294316,29.535293],[106.293923,29.532214],[106.293662,29.531248],[106.29261,29.530455],[106.291281,29.53044],[106.289506,29.530937],[106.28549,29.532876],[106.284419,29.532851],[106.284227,29.53251],[106.284647,29.531421],[106.284515,29.530806],[106.283133,29.530251],[106.282404,29.530166],[106.280508,29.530251],[106.276154,29.530672],[106.275317,29.530419],[106.27392,29.529202],[106.272999,29.527965],[106.27239,29.527446],[106.270252,29.527398],[106.267873,29.527108],[106.265603,29.526157],[106.264727,29.525197],[106.26405,29.52534],[106.262607,29.52705],[106.261375,29.529382],[106.261237,29.53094],[106.260775,29.532156],[106.259905,29.53258],[106.258361,29.532525],[106.257614,29.532327],[106.257476,29.532013],[106.258145,29.530797],[106.257899,29.530382],[106.256834,29.529873],[106.256243,29.530467],[106.255356,29.532382],[106.254246,29.532424],[106.253436,29.532848],[106.252231,29.530967],[106.252213,29.530547],[106.253394,29.529068],[106.253124,29.525002],[106.25328,29.519709],[106.253493,29.51877],[106.254339,29.518093],[106.26198,29.516511],[106.262676,29.516648],[106.263831,29.517721],[106.264311,29.518349],[106.264874,29.519819],[106.265387,29.520734],[106.265933,29.520993],[106.267514,29.520956],[106.268194,29.520423],[106.268194,29.519523],[106.267508,29.517688],[106.26497,29.513554],[106.26351,29.510261],[106.262964,29.508563],[106.262607,29.506727],[106.262259,29.50301],[106.261893,29.500254],[106.260991,29.49733],[106.260592,29.49428],[106.26073,29.492725],[106.261441,29.490429],[106.261797,29.490169],[106.262736,29.490224],[106.263423,29.49095],[106.264437,29.49314],[106.265384,29.494552],[106.266548,29.495125],[106.26701,29.495006],[106.267472,29.493536],[106.267436,29.49238],[106.266845,29.490188],[106.264638,29.486995],[106.264257,29.485626],[106.26429,29.484906],[106.264922,29.483967],[106.266158,29.48339],[106.268692,29.483177],[106.270798,29.483497],[106.271832,29.483433],[106.272795,29.482573],[106.273614,29.481237],[106.273806,29.480545],[106.273605,29.479553],[106.27302,29.47884],[106.271388,29.477846],[106.270033,29.477885],[106.267304,29.479624],[106.265948,29.480215],[106.26527,29.480203],[106.263726,29.47945],[106.262481,29.477891],[106.262004,29.476839],[106.261477,29.474664],[106.261519,29.473347],[106.26249,29.47066],[106.262769,29.469342],[106.262718,29.468701],[106.262325,29.468058],[106.260877,29.466975],[106.260268,29.466032],[106.260292,29.464761],[106.260658,29.462189],[106.261534,29.46002],[106.263264,29.457104],[106.263924,29.455682],[106.264176,29.454328],[106.264089,29.453675],[106.263618,29.452748],[106.262724,29.451601],[106.263942,29.451201],[106.266296,29.451021],[106.267903,29.449743],[106.269529,29.449932],[106.271724,29.45067],[106.272795,29.450649],[106.276853,29.449425],[106.278565,29.449014],[106.278991,29.448788],[106.279522,29.448022],[106.280119,29.446033],[106.280685,29.445273],[106.284101,29.443742],[106.285232,29.44264],[106.285625,29.44199],[106.2857,29.440852],[106.285337,29.439281],[106.285397,29.438509],[106.286057,29.437194],[106.286551,29.436678],[106.287154,29.436599],[106.288456,29.437453],[106.288954,29.438546],[106.289242,29.440138],[106.289673,29.440846],[106.290615,29.441499],[106.291041,29.441548],[106.291578,29.441093],[106.292649,29.439714],[106.293917,29.439006],[106.294832,29.438857],[106.295363,29.439266],[106.29637,29.440569],[106.296919,29.440944],[106.298059,29.441014],[106.298545,29.440773],[106.299066,29.439736],[106.299381,29.438228],[106.299675,29.437518],[106.300476,29.436361],[106.301547,29.435849],[106.30265,29.436227],[106.304363,29.437612],[106.305241,29.437533],[106.306009,29.436755],[106.306897,29.435263],[106.307218,29.434265],[106.307488,29.43223],[106.307347,29.428748],[106.307356,29.426817],[106.30786,29.425974],[106.308738,29.425831],[106.310679,29.426981],[106.312037,29.427604],[106.313255,29.42772],[106.31575,29.427494],[106.319025,29.42826],[106.320084,29.428153],[106.321364,29.427448],[106.322627,29.425849],[106.323035,29.424754],[106.323383,29.422526],[106.323305,29.421138],[106.32299,29.420472],[106.321868,29.419603],[106.320015,29.418849],[106.31925,29.418281],[106.318266,29.417052],[106.317274,29.415217],[106.317576,29.413554],[106.31737,29.412095],[106.317526,29.411064],[106.318275,29.410197],[106.318788,29.410136],[106.319196,29.411516],[106.319337,29.413643],[106.319928,29.414479],[106.320806,29.415037],[106.321295,29.415101],[106.325995,29.41443],[106.327968,29.414561],[106.328526,29.414329],[106.329048,29.413667],[106.329309,29.40767],[106.329222,29.40546],[106.328628,29.401349],[106.328673,29.397866],[106.329333,29.397332],[106.330847,29.397024],[106.331282,29.396737],[106.331264,29.395901],[106.330994,29.395553],[106.327443,29.394313],[106.32472,29.392702],[106.32379,29.391572],[106.323416,29.390309],[106.322294,29.387311],[106.321205,29.386539],[106.320162,29.386365],[106.318212,29.38663],[106.316062,29.388312],[106.31441,29.388837],[106.313627,29.388804],[106.312982,29.388187],[106.312391,29.386896],[106.311965,29.386444],[106.310808,29.386114],[106.309032,29.3858],[106.30824,29.385366],[106.306807,29.383926],[106.306588,29.383162],[106.306849,29.382317],[106.307998,29.380619],[106.308927,29.379972],[106.308414,29.379548],[106.307257,29.379279],[106.303646,29.380018],[106.297663,29.379038],[106.295576,29.378782],[106.294592,29.379221],[106.294061,29.380103],[106.294088,29.381917],[106.294403,29.384567],[106.294037,29.385321],[106.29243,29.386652],[106.291194,29.387161],[106.288648,29.387586],[106.287298,29.387522],[106.28662,29.387326],[106.285646,29.386737],[106.28435,29.38518],[106.283882,29.384106],[106.283325,29.38185],[106.282698,29.378043],[106.28262,29.376159],[106.283567,29.372349],[106.283429,29.370474],[106.283124,29.369543],[106.282254,29.368166],[106.281255,29.367424],[106.279063,29.36645],[106.27664,29.364389],[106.275683,29.363235],[106.275458,29.362401],[106.275554,29.361779],[106.2761,29.360618],[106.276901,29.359992],[106.27822,29.359327],[106.278697,29.358856],[106.279429,29.357125],[106.279558,29.356206],[106.279378,29.354893],[106.27855,29.353397],[106.277812,29.352926],[106.273188,29.351861],[106.271406,29.351534],[106.270998,29.351082],[106.269946,29.350627],[106.267454,29.350233],[106.267001,29.349778],[106.267394,29.34943],[106.267385,29.348456],[106.266932,29.347943],[106.266272,29.347772],[106.265942,29.347372],[106.266194,29.346223],[106.265873,29.344907],[106.26482,29.344452],[106.264482,29.343536],[106.264413,29.340323],[106.264143,29.338662],[106.263543,29.337916],[106.262718,29.337446],[106.261597,29.336267],[106.261252,29.335501],[106.261504,29.334377],[106.263369,29.332074],[106.264793,29.330623],[106.265696,29.330153],[106.266887,29.329957],[106.269304,29.329884],[106.272813,29.329331],[106.274525,29.328729],[106.274951,29.328439],[106.275419,29.327614],[106.275299,29.325324],[106.275575,29.323827],[106.275992,29.323097],[106.276943,29.322272],[106.279228,29.321331],[106.280218,29.321102],[106.2822,29.321145],[106.282947,29.321741],[106.28372,29.322959],[106.284215,29.323265],[106.285547,29.323249],[106.287277,29.322608],[106.288762,29.321417],[106.289155,29.32069],[106.289059,29.31996],[106.288408,29.318478],[106.288867,29.315701],[106.288807,29.314916],[106.288399,29.313853],[106.287058,29.311919],[106.285451,29.311003],[106.285322,29.31067],[106.286381,29.308205],[106.287172,29.306695],[106.287127,29.305376],[106.28665,29.304496],[106.285136,29.302754],[106.283858,29.301896],[106.282686,29.30156],[106.282182,29.300894],[106.282302,29.299928],[106.284128,29.294291],[106.284719,29.291517],[106.284059,29.290756],[106.282155,29.290142],[106.28145,29.289644],[106.28031,29.287875],[106.279954,29.28693],[106.280041,29.285616],[106.281843,29.283166],[106.284632,29.281045],[106.287256,29.27695],[106.28863,29.274469],[106.289865,29.271868],[106.290681,29.26964],[106.292481,29.267158],[106.293716,29.264432],[106.294943,29.261089],[106.298692,29.256492],[106.302194,29.255232],[106.309521,29.254554],[106.311923,29.254783],[106.319136,29.256699],[106.326912,29.25923],[106.329753,29.260563],[106.332302,29.261406],[106.337688,29.263583],[106.33982,29.264555],[106.341812,29.266388],[106.3441,29.268839],[106.346676,29.271287],[106.34867,29.272996],[106.350653,29.274093],[106.353778,29.27567],[106.35591,29.276886],[106.358456,29.277852],[106.361284,29.278319],[106.370036,29.278863],[106.372576,29.279334],[106.376394,29.280409],[106.384035,29.283053],[106.386449,29.284758],[106.388015,29.28573],[106.38931,29.287322],[106.392022,29.290258],[106.392612,29.292103],[106.393212,29.294936],[106.392681,29.297285],[106.391041,29.301126],[106.388972,29.304233],[106.386938,29.309928],[106.385981,29.312405],[106.386053,29.317217],[106.386347,29.31882],[106.387364,29.320784],[106.390207,29.322483],[106.39192,29.324316],[106.392528,29.327767],[106.393041,29.334426],[106.393788,29.337257],[106.394511,29.338607],[106.395509,29.339337],[106.397768,29.340054],[106.400878,29.340763],[106.400854,29.345304],[106.400782,29.345903],[106.400245,29.347051],[106.398637,29.348963],[106.397969,29.350954],[106.397003,29.355],[106.39631,29.35729],[106.396604,29.358408],[106.397327,29.358966],[106.399237,29.35925],[106.402962,29.359085],[106.403475,29.359287],[106.407889,29.364859],[106.409137,29.366804],[106.409545,29.368078],[106.40893,29.368548],[106.406882,29.369378],[106.406333,29.370022],[106.405838,29.373588],[106.40576,29.380949],[106.405256,29.382115],[106.402827,29.38391],[106.401247,29.384615],[106.399081,29.385369],[106.398248,29.386014],[106.396382,29.388489],[106.395407,29.389924],[106.395878,29.390947],[106.397684,29.391008],[106.397909,29.392683],[106.397546,29.394014],[106.395287,29.397299],[106.394889,29.398318],[106.394646,29.400458],[106.393098,29.406251],[106.392714,29.40883],[106.392888,29.410121],[106.39353,29.411357],[106.394784,29.412346],[106.398164,29.413008],[106.398451,29.413658],[106.397564,29.415309],[106.395608,29.418098],[106.393848,29.420012],[106.393479,29.420653],[106.393368,29.421754],[106.393881,29.423973],[106.393689,29.429355],[106.39383,29.430033],[106.394523,29.43129],[106.396427,29.433676],[106.397018,29.434945],[106.39688,29.438351],[106.397357,29.439733],[106.397903,29.440315],[106.3984,29.440456],[106.399441,29.440141],[106.4019,29.438582],[106.402665,29.438369],[106.403865,29.43839],[106.406288,29.438808],[106.406972,29.439034],[106.408519,29.441356],[106.408102,29.441878],[106.41049,29.442976],[106.412094,29.443049],[106.412025,29.442341],[106.411644,29.441511],[106.410583,29.440413],[106.410097,29.439168],[106.410142,29.438164],[106.409515,29.436498],[106.4095,29.435687],[106.410115,29.433929],[106.410816,29.433218],[106.411911,29.432715],[106.414169,29.432135],[106.415897,29.43154],[106.416563,29.430939],[106.416773,29.430164],[106.416356,29.428568],[106.415384,29.424064],[106.415756,29.422438],[106.416701,29.421202],[106.417501,29.420564],[106.419298,29.419829],[106.421103,29.419517],[106.422006,29.419795],[106.423289,29.420839],[106.423565,29.421284],[106.422222,29.422404],[106.421301,29.423976],[106.421268,29.42479],[106.421676,29.425523],[106.423071,29.426594],[106.423334,29.427192],[106.423721,29.427692],[106.423946,29.42772],[106.424165,29.428449],[106.4246,29.428031],[106.424252,29.426783],[106.424288,29.426292]
      ]
        console.log(path)
        const polygon = new AMap.Polygon({
          path, // 设置多边形边界路径
          strokeColor: '#BFAE92', // 线颜色
          strokeOpacity: 0.4, // 线透明度
          strokeWeight: 3, // 线宽
          fillColor: '#1791fc', // 填充色
          fillOpacity: 0.35 // 填充透明度
        })
        // 画出围栏
        this.map.add(polygon)
        // 自动缩放并聚焦合适中心点
        this.map.setFitView([polygon])
      }
    }
  }
  </script>
  <style scoped>
  #map{
    height: 100%;
    width: 100%;
  }
  </style>
